home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Documentation / Books / Learn Java on the Macintosh / Learn Java Projects / 06.02 - postfix / Postfix.java < prev    next >
Text File  |  1996-04-22  |  505b  |  23 lines

  1. /* -------------------------------------------------------------
  2. This applet illustrates prefix and postfix notation.
  3.  
  4. Java's classes: Applet    (applet)
  5.                 System    (lang)
  6.  
  7. Custom classes: Postfix
  8.  
  9. ------------------------------------------------------------- */
  10. public class Postfix extends java.applet.Applet {
  11.  
  12.    static {
  13.    
  14.       int        myInt;
  15.     
  16.       myInt = 5;
  17.       
  18.       System.out.println("myInt ---> " + myInt++);
  19.  
  20.       System.out.println("myInt ---> " + ++myInt);
  21.  
  22.    }      
  23. }